CC=gcc
CFLAGS=-c -fPIC -Wall -ggdb -std=c99 -pedantic-errors -D_GNU_SOURCE
GCFLAGS=`pkg-config --cflags glib-2.0`
GLIBS=`pkg-config --libs glib-2.0`
OBJECTS=List.o ListIter.o Vector.o VectorIter.o Regex.o assert.o

%.o: %.c
	$(CC) -c -fPIC $(CFLAGS) $(GCFLAGS) $< -o $@

libtypes.so: $(OBJECTS)
	$(CC) $(GLIBS) -shared -Wl,-soname,$@ -o $@.1 $(OBJECTS)

clean:
	rm -f *.o
